package com.buaa.aimall.modelModule.Entity;

import com.baomidou.mybatisplus.annotation.*;
import com.buaa.aimall.modelModule.Enum.ModelRatingEnum;
import com.buaa.aimall.modelModule.Enum.ModelStatusEnum;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.time.LocalDateTime;

@TableName(value = "models")
@FieldNameConstants
@Data
public class ModelEntity {
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("model_name_en")
    private String nameEN;

    @TableField("model_name_zh")
    private String nameZH;

    @TableField("version")
    private String version;

    @TableField("model_type")
    private String type;

    @TableField("fk_creator")
    private String creator;

    @TableField("image_url")
    private String imageURL;

    @TableField("image_url_backup")
    private String imageURLBackup;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @TableField("fk_model_key")
    private String modelKey;

    @TableField("memory_size")
    private Double memorySize;

    @TableField("model_status")
    private ModelStatusEnum status;

    @TableField("model_is_enabled")
    private Boolean isEnabled;

    @TableField("doc_url")
    private String docURL;

    @TableField("model_description")
    private String description;

    @TableField("price_by_times")
    private Integer priceByTimes;

    @TableField("price_by_day")
    private Integer priceByDay;

    @TableField("price_by_week")
    private Integer priceByWeek;

    @TableField("price_by_month")
    private Integer priceByMonth;

    @TableField("model_rating")
    private ModelRatingEnum rating;

    @TableField("del_flag")
    @TableLogic
    private int delFlag;

    @TableField("fk_model_api")
    private String fkModelApi;
}
